package edu.nbut.hotel.model.entity.javafxbean;

import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

import java.util.Date;

public class PreOrder {
    private StringProperty preOrderId;
    private StringProperty name;
    private StringProperty contact;
    private StringProperty orderDate;
    private IntegerProperty orderTime;
    private StringProperty roomNumber;
    private StringProperty other;

    public PreOrder(edu.nbut.hotel.model.dto.PreOrder preOrder){
        preOrderId = new SimpleStringProperty(preOrder.getPreOrderId());
        name = new SimpleStringProperty(preOrder.getName());
        contact = new SimpleStringProperty(preOrder.getContact());
        orderDate = new SimpleStringProperty(preOrder.getOrderDate().toString());
        orderTime = new SimpleIntegerProperty(preOrder.getOrderTime());
        roomNumber = new SimpleStringProperty(preOrder.getRoomNumber());
        other = new SimpleStringProperty(preOrder.getOther());
    }

    public String getPreOrderId() {
        return preOrderId.get();
    }

    public StringProperty preOrderIdProperty() {
        return preOrderId;
    }

    public void setPreOrderId(String preOrderId) {
        this.preOrderId.set(preOrderId);
    }

    public String getName() {
        return name.get();
    }

    public StringProperty nameProperty() {
        return name;
    }

    public void setName(String name) {
        this.name.set(name);
    }

    public String getContact() {
        return contact.get();
    }

    public StringProperty contactProperty() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact.set(contact);
    }

    public String getOrderDate() {
        return orderDate.get();
    }

    public StringProperty orderDateProperty() {
        return orderDate;
    }

    public void setOrderDate(String orderDate) {
        this.orderDate.set(orderDate);
    }

    public int getOrderTime() {
        return orderTime.get();
    }

    public IntegerProperty orderTimeProperty() {
        return orderTime;
    }

    public void setOrderTime(int orderTime) {
        this.orderTime.set(orderTime);
    }

    public String getRoomNumber() {
        return roomNumber.get();
    }

    public StringProperty roomNumberProperty() {
        return roomNumber;
    }

    public void setRoomNumber(String roomNumber) {
        this.roomNumber.set(roomNumber);
    }

    public String getOther() {
        return other.get();
    }

    public StringProperty otherProperty() {
        return other;
    }

    public void setOther(String other) {
        this.other.set(other);
    }
}
